body {
    margin: 0;
    padding: 0;
    background: url(../img/8.jfif);
    background-color: aquamarine;
    background-size: 1550px 800px;
    overflow: hidden;
}

.box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 900px;
}

.box1 {
    width: 400px;
    height: 400px;
    transform-style: preserve-3d;
    /* transform:translate(-50%, -50%); */
    animation: dh 5s linear infinite;
}

.box .box1 div {
    width: 100%;
    height: 100%;
    position: absolute;
    font-size: 20px;
    line-height: 400px;
    text-align: center;
    color: white;
    transition: 0.6s;
}

.box .box1 .font {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: translateZ(200px);
    background: url(../img/10.jfif);
}

.box .box1 .back {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: translateZ(-200px) rotateY(180deg);
    background: url(../img/1.jfif);
}

.box .box1 .right {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: rotateY(90deg) translateZ(200px);
    background: url(../img/2.jfif);
}

.box .box1 .left {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: rotateY(-90deg) translateZ(200px);
    background: url(../img/3.jfif);
}

.box .box1 .top {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: rotateX(90deg) translateZ(200px);
    background: url(../img/4.jfif);
}

.box .box1 .bottom {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.8;
    transform: rotateX(-90deg) translateZ(200px);
    background: url(../img/5.jfif);
}


/*悬浮效果*/

.box .box1:hover .font {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: translateZ(400px);
    background: url(../img/1.jfif);
}

.box .box1:hover .back {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: translateZ(-400px) rotateY(180deg);
    background: url(../img/2.jfif);
}

.box .box1:hover .right {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: rotateY(90deg) translateZ(400px);
    background: url(../img/3.jfif);
}

.box .box1:hover .left {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: rotateY(-90deg) translateZ(400px);
    background: url(../img/4.jfif);
}

.box .box1:hover .top {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: rotateX(90deg) translateZ(400px);
    background: url(../img/5.jfif);
}

.box .box1:hover .bottom {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    opacity: 0.4;
    transition-duration: 1s;
    transform: rotateX(-90deg) translateZ(400px);
    background: url(../img/6.jfif);
}


/*形成魔方并且旋转*/

@keyframes dh {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}


/* 将内部盒子设置为外部盒子的一半大小，并定位在外部魔方的内部中心。 */

.box .box1 i {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -100px;
    margin-left: -100px;
    width: 200px;
    height: 200px;
}


/* 将内部的六面在X,Y,Z,轴上旋转形成正方形 */

.box .box1 .i-font {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: translateZ(100px);
    background: url(../img/5.jfif);
}

.box .box1 .i-back {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: translateZ(-100px) rotateY(180deg);
    background: url(../img/6.jfif);
}

.box .box1 .i-right {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: rotateY(90deg) translateZ(100px);
    background: url(../img/7.jfif);
}

.box .box1 .i-left {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: rotateY(-90deg) translateZ(100px);
    background: url(../img/8.jfif);
}

.box .box1 .i-top {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: rotateX(90deg) translateZ(100px);
    background: url(../img/9.jfif);
}

.box .box1 .i-bottom {
    background: rgb(9, 179, 221);
    background-size: 100% 100%;
    transform: rotateX(-90deg) translateZ(100px);
    background: url(../img/10.jfif);
}